import request from '@/utils/request'

// 查询车辆租赁信息列表
export function listRentals(query) {
  return request({
    url: '/system/rentals/list',
    method: 'get',
    params: query
  })
}

// 查询车辆租赁信息详细
export function getRentals(vehicleId) {
  return request({
    url: '/system/rentals/' + vehicleId,
    method: 'get'
  })
}

// 新增车辆租赁信息
export function addRentals(data) {
  return request({
    url: '/system/rentals',
    method: 'post',
    data: data
  })
}

// 修改车辆租赁信息
export function updateRentals(data) {
  return request({
    url: '/system/rentals',
    method: 'put',
    data: data
  })
}

// 删除车辆租赁信息
export function delRentals(vehicleId) {
  return request({
    url: '/system/rentals/' + vehicleId,
    method: 'delete'
  })
}
